﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyBlog.WebApi.Filters;

namespace MyBlog.WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class TestController : ControllerBase
    {

        [TypeFilter(typeof(CustomResourceFilterAttribute))]
        [HttpGet("GetCache")]
        public IActionResult GetCache(string name)
        {
            return new JsonResult(new
            {
                name = name,
                age = 19,
                sex = true
            });
        }
    }
}
